﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QTcpSocket>
#include <QTcpServer>
#include <QNetworkInterface>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

public slots:
    void ReadAllData();
    void Connected();
    void Disconnected();
    void StateChanged();

private slots:
    void on_btnSend_clicked();

    void on_btnDisconnect_clicked();

private:
    Ui::MainWindow *ui;
    QTcpSocket *tcpSocket = nullptr;
    QHostAddress address;
    int port;
};
#endif // MAINWINDOW_H
